package com.codeoss.module.product.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.codeoss.framework.service.impl.BaseService;
import com.codeoss.module.product.dao.ProductAttributeMapper;
import com.codeoss.module.product.model.ProductAttribute;
import com.codeoss.module.product.service.IProductAttributeService;

@Service
public class ProductAttributeService extends BaseService<ProductAttributeMapper, ProductAttribute>
		implements IProductAttributeService {
	@Override
	public List<ProductAttribute> getProductAttributeListByAttributeSetId(Long attributeSetId) {
		// TODO Auto-generated method stub
		QueryWrapper<ProductAttribute> query=new QueryWrapper<ProductAttribute>();
		query.inSql("id","(select product_attribute_id from product_attribute_use where product_attribute_set_id="+attributeSetId+")");
		return list(query);
	}
}